#!/bin/zsh
source ~/.zshrc

#git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
#git clone https://github.com/zsh-users/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions

git clone https://gitee.com/mirrors/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting
git clone https://gitee.com/mirrors/zsh-autosuggestions.git $ZSH_CUSTOM/plugins/zsh-autosuggestions


echo "------------setting zshrc environment...------------"
source ~/.zshrc
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="ys"/' ~/.zshrc
sed -i 's/plugins=(git)/plugins=(git wd zsh-autosuggestions zsh-syntax-highlighting last-working-dir)/' ~/.zshrc

echo "setopt nonomatch" >> ~/.zshrc
echo -e "export PATH=${HOME}/.local/bin:\$PATH" >> ~/.zshrc

source ~/.zshrc
